package com.ldatum.crm.serviceImpl;

import java.util.List;

import com.ldatum.crm.dao.TContactsDao;
import com.ldatum.crm.daoImpl.TContactsDaoImpl;
import com.ldatum.crm.domain.TContacts;
import com.ldatum.crm.service.TContactsService;

public class TContactsServiceImpl implements TContactsService {
	
	TContactsDao contactsDao = new TContactsDaoImpl();
	@Override
	public void add(TContacts contacts) throws Exception {
		contactsDao.add(contacts);
	}

	@Override
	public void delete(TContacts contacts, int id) throws Exception {
		contactsDao.delete(contacts,id);

	}

	@Override
	public void update(TContacts contacts, int id) throws Exception {
		contactsDao.update(contacts,id);
	}

	@Override
	public TContacts findById(Class<TContacts> clazz, int id) throws Exception {
		return contactsDao.findById(clazz,id);
	}
	
	@Override
	public TContacts queryById(Class<TContacts> clazz, int id) throws Exception {
		return contactsDao.queryById(clazz,id);
	}

	@Override
	public List<TContacts> list(Class<TContacts> clazz,String employee ) throws Exception {
		return contactsDao.list(clazz,employee);
	}

	@Override
	public List<TContacts> findByNo(Class<TContacts> clazz, String no) throws Exception {
		return contactsDao.findByNo(clazz,no);
	}

	@Override
	public void deletes(String ids) throws Exception {
		contactsDao.deletes(ids);
	}

	@Override
	public List<TContacts> findByCustomerId(int customerId) throws Exception {
		return contactsDao.findByCustomerId(customerId);
	}


}
